import service from "@/utils/request";

export const updateAdminApi = (formData: {}) => {
  return service({
    url: "/v0/admin/update",
    method: "POST",
    data: formData,
  });
};
export const createAdminApi = (formData: {}) => {
  return service({
    url: "/v0/admin/create",
    method: "POST",
    data: formData,
  });
};

export const deleteAdminApi = (id: number) => {
  return service({
    url: "/v0/admin/delete",
    method: "GET",
    params: { id },
  });
};

export const AdminPageApi = (params: { pageSize: number; pageNum: number }) => {
  return service({
    url: "/v0/admin/page",
    method: "GET",
    params: params,
  });
};
